﻿using System;

namespace _5
{
    class Program
    {
        static int f(int n)
        {
            int a;
            if (n == 0)
                return 2;
            else if (n == 1)
                return 3;
            else
                a = f(n - 1) + f(n - 2);
            return a;
        }
        static void Main(string[] args)
        {
            int n;       
            n=Convert.ToInt32(Console.ReadLine());
            Console.WriteLine(f(n));
            Console.ReadKey();
        }
    }
}
